package com.cailu.rabmq.sender.config;

import org.springframework.amqp.core.Queue;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.cailu.common.constant.DirectSenderCommon;

/**
 * @author cailu
 * @filename DirectSenderConfig
 * @description Direct 直接交换模式 创建
 * @date 2020/3/30 14:35
 */
@Configuration
public class DirectSenderConfig {

	/**
	 * 功能描述  创建一个DIRECT_DEMO 的交换机
	 * @return org.springframework.amqp.core.Queue
	 * @author cailu
	 * @date 2020/3/30 16:24
	 */
	@Bean
	public Queue demoDirect() {
		Queue queue = new Queue(DirectSenderCommon.DIRECT_DEMO);
		return queue;
	}

	/**
	 * 功能描述  DIRECT_HELLO 的交换机
	 * @return org.springframework.amqp.core.Queue
	 * @author cailu
	 * @date 2020/3/30 16:25
	 */
	@Bean
	public Queue helloDirect() {
		Queue queue = new Queue(DirectSenderCommon.DIRECT_HELLO);
		return queue;
	}

	/**
	 * 功能描述  对象交换机
	 * @return org.springframework.amqp.core.Queue
	 * @author cailu
	 * @date 2020/3/31 15:00
	 */
	@Bean
	public Queue beanDirect() {
		Queue queue = new Queue(DirectSenderCommon.DIRECT_BEAN);
		return queue;
	}

}
